package com.xy.service.impl;

import com.xy.entity.CertificateTypeEntity;
import com.xy.mapper.CertificateTypeMapper;
import com.xy.service.ICertificateTypeService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;

import java.util.Comparator;
import java.util.List;
import com.xy.entity.CertificateTypeEntity;
import com.xy.vo.CertificateTypeVO;
import com.xy.excel.CertificateTypeExcel;
import com.xy.mapper.CertificateTypeMapper;
import com.xy.service.ICertificateTypeService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
/**
 * @BelongsPackage: com.xy.service
 * @Author: WK
 * @CreateTime: 2023-07-19
 * @Description:
 * @Version: 1.0
 */


@Service
public class CertificateTypeServiceImpl extends BaseServiceImpl<CertificateTypeMapper, CertificateTypeEntity> implements ICertificateTypeService {


	@Override
	public List<CertificateTypeEntity> getList() {
		CertificateTypeEntity quer = new CertificateTypeEntity();
		quer.setStatus(0);
		List<CertificateTypeEntity> list = this.list(Condition.getQueryWrapper(quer));
		return list;
	}

	@Override
	public IPage<CertificateTypeVO> selectCertificateTypePage(IPage<CertificateTypeVO> page, CertificateTypeVO certificateType) {
		return page.setRecords(baseMapper.selectCertificateTypePage(page, certificateType));
	}


	@Override
	public List<CertificateTypeExcel> exportCertificateType(Wrapper<CertificateTypeEntity> queryWrapper) {
		List<CertificateTypeExcel> certificateTypeList = baseMapper.exportCertificateType(queryWrapper);
		//certificateTypeList.forEach(certificateType -> {
		//	certificateType.setTypeName(DictCache.getValue(DictEnum.YES_NO, CertificateType.getType()));
		//});
		return certificateTypeList;
	}

}
